<?php

namespace app\command;

use app\admin\model\base\SysConfig;
use app\datacenter\service\LargeScreenService;
use think\console\Command;
use think\console\Input;
use think\console\Output;

/**
 * 数据大屏消息推送
 */
class DatacenterPush extends Command
{
    protected function configure()
    {
        $this->setName('DatacenterPush')->setDescription('数据大屏消息推送');
    }

    protected function execute(Input $input, Output $output)
    {
        //加载系统配置
        SysConfig::loadConfig();
        $LargeScreenService = new LargeScreenService();
        $LargeScreenService->getData(1);
        sleep(3);
        $LargeScreenService->getData(2);
        sleep(3);
        $LargeScreenService->getData(3);
        sleep(3);
        $LargeScreenService->getData(4);
        sleep(3);
        $LargeScreenService->getData(5);
        die;
    }
}